package com.orifine.orm.information;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

import com.orifine.orm.Information;
import com.orifine.orm.model.ColumnModel;

public class BooleanRandomInfo implements Information {
	private Map<Integer, Boolean> valueMap = new HashMap<Integer, Boolean>();
	
	@Override
	public Object value(int index, ColumnModel columnMapper) {
		Boolean value = valueMap.get(index);
		if(value == null){
			value = random.nextBoolean();
			valueMap.put(index, value);
		}
		return value;
	}

	@Override
	public void init(ColumnModel columnMapper) {
	}
	
	private Random random = new Random();
}
